<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php  
	
			$reg=$_POST['txtReg'];
			$year=$_POST['sltYr'];
			$subgr=$_POST['sltSubgr'];
			$check=$_POST['rType'];
		
			
			if($check=="line"){
			
			include'../logic/Classes/db.php';

            $x=new DbConnect();
            $con=$x->getConnection();

			include'../logic/Classes/examHandler.php';  
			
			
			$x=NULL;
			$z=NULL;
			$w=NULL;
			
			$xm=new ExamHandler();
			$xm->setCon($con);
			
			$result1=$xm->getSubjectProgress($reg,$subgr,$year);
            $result2=$xm->getSubjectProgress($reg,$subgr,$year);
			$result3=$xm->getSubjectProgress($reg,$subgr,$year);
			$result4=$xm->getSubjectProgress($reg,$subgr,$year);
			
			$count=mysql_num_rows($result1);
			?>
 
 
<script>
document.location="http://chart.apis.google.com/chart?chs=750x400&cht=lc&chd=t:<?php while($row=mysql_fetch_array($result2)){$x=$x+1;$y=$row['marks'];echo $y;if($x<$count){echo",";}}?>&chxt=x,y&chxl=0:|<?php while($row1=mysql_fetch_array($result3)){ $z=$z+1;echo $row1['month'];if($z<$count){ echo"|";} } ?>&chco=3072F3&chtt=Student+Marks";</script>
</body>
 <?php
 } 
 else{ 
 
 header("location:subect_wise_progress.php?reg=$reg&year=$year&subgr=$subgr"); 
  
 } ?>

 </html>